Ignition: verify on all enabled verification services#7967
Ignition: verify on all enabled verification services#7967kanej merged 16 commits intoNomicFoundation:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 316c7e9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR adds support for verifying deployed contracts on all enabled verification services (Etherscan, Blockscout, and Sourcify) instead of only Etherscan. The implementation follows the same pattern as the standalone hardhat verify command from hardhat-verify.
Changes:
- Modified the ignition verify task to iterate through all enabled verification providers and verify contracts on each
- Added creation transaction hash tracking to deployment execution results for Sourcify verification
- Updated task description from "Verify the deployment on Etherscan" to "Verify the deployment on all supported explorers"
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| v-next/hardhat-ignition/src/internal/tasks/verify.ts | Refactored verify task to loop through enabled providers with error handling for individual provider failures |
| v-next/hardhat-ignition/src/index.ts | Updated task description to reflect multi-provider support |
| v-next/hardhat-ignition/test/tasks/verify.ts | Added comprehensive tests for multi-provider verification, error handling, and edge cases |
| v-next/hardhat-ignition-core/src/internal/execution/types/execution-result.ts | Added creationTxHash field to SuccessfulDeploymentExecutionResult |
| v-next/hardhat-ignition-core/src/strategies/basic-strategy.ts | Updated to capture and return creation transaction hash |
| v-next/hardhat-ignition-core/src/strategies/create2-strategy.ts | Updated to capture and return creation transaction hash |
| v-next/hardhat-ignition-core/src/verify.ts | Updated to include creationTxHash in verification information |
| v-next/hardhat-ignition-core/src/types/verify.ts | Added creationTxHash field to VerifyInfo interface |
| v-next/hardhat-ignition-core/test/**/*.ts | Updated test files to include creationTxHash in mock execution results |
| v-next/hardhat-ignition-core/test/mocks/**/journal.jsonl | Updated mock journal files with creationTxHash in deployment results |
| .changeset/tame-socks-cover.md | Added changeset documenting the new feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hey @manuelwedler, thanks for this! |
Instead of piping it through the journal, we can read the state directly and retrieve the last transaction for the deployment.
Set the exit code to 1 if one of the verifications fails. The are a mixture of other refactors as well.
|
Hey @kanej , any update on this? |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
You can also share your feedback on Copilot code review. Take the survey.
|
Hey @manuelwedler, thanks for putting this together. The threading through of creationTxHash makes sense, but would imply a migration for existing journal files - and we try to avoid that. I have switched to pulling the creation transaction from the deployment state. I am assuming that the last confirmed transaction is the creation transaction but for the two strategies we have ( I have done a manual test with Sourcify and I was able to get an Can you take a look, and if your happy I will merge in the new feature and get it released. |
|
Hey @kanej, thanks for finalizing this PR! The changes look good to me. The assumption of using the last confirmed transaction as the creation transaction seems to make sense. So let's get this merged :) |
|
@kanej I just created a PR against hardhat-website to update the docs for this change: NomicFoundation/hardhat-website#242 |
Closes #7538
This changes the
ignition deploy verycommand and theignition deploy --verifyoption (the option just calls the task internally) to verify deployed contracts on all enabled verification providers. With this, the verify task of ignition follows the same pattern as the verify task of hardhat-verify.verifyContractfor all verification providers that are not disabled for each of the deployed contractsverifyContractExample